﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="LichSuMuaHang.aspx.cs" Inherits="Cart.LichSuMuaHang" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript" charset="utf-8">
        function XoaHoaDon(id) {
            var answer = confirm("Bạn có chắc muốn xóa ko ?")
            if (answer) {
                ob_post.AddParam('strHoaDonId', id);
                ob_post.post(null, "vXoaHoaDon", ResultXoaChiTiet);
            }
        }
        function ResultXoaChiTiet(result, ex) {
                alert(result);
                window.location = "LichSuMuaHang.aspx";
        }
        </script>
    <div class="content_buy_cart">
                            <div class="buy_cart_top">
                            </div>

                            <div class="buy_cart_content">
                                <div class="profile_breadcrumbs">


                                    <ul>
                                        <li>
                                            <a class="" href="ThongTinCaNhan.aspx" title="">Thông tin cá nhân
                                            </a>
                                        </li>

                                        <li>|
                                        </li>

                                        <li>
                                            <a class="active" href="LichSuMuaHang.aspx" title="">Lịch sử mua hàng
                                            </a>
                                        </li>

                                       
                                    </ul>

                                </div>

                                <!-- cart-detail-begin -->
                                <p class="buy_cart_title">
                                    LỊCH SỬ MUA HÀNG CỦA BẠN
                                </p>
                                <asp:Repeater runat="server" ID="RptParent">
                                    <ItemTemplate>
                                        <div class="buy_cart_content_title">
                                            <span class="content_title_delete">STT</span>
                                            <span class="content_title_product">Sản phẩm / Dịch vụ</span>
                                            <span class="content_title_price">Đơn giá</span>
                                            <span class="content_title_quanlity">Số lượng</span>
                                            <span class="content_title_total">Thành tiền</span>
                                        </div>
                                        <table class="table_buy_cart_content table_my_order" border="0" cellpadding="0" cellspacing="0">
                                                    <tbody>
                                                        <asp:Repeater runat="server" ID="RptChild" datasource='<%# ((Cart.HoaDonSrv.HoaDon)Container.DataItem).lstChiTiet.Select ( link => new {
                                                                                                    TrangThai = ((Cart.HoaDonSrv.HoaDon)Container.DataItem).TrangThai, 
                                                                                                    TongTien = ((Cart.HoaDonSrv.HoaDon)Container.DataItem).TongTien, 
                                                                                                    ThoiGian = ((Cart.HoaDonSrv.HoaDon)Container.DataItem).ThoiGian, 
                                                                                                    STT = link.STT,
                                                                                                    SanPhamTen = link.SanPhamTen,
                                                                                                    GiaTien = link.GiaTien,
                                                                                                    SoLuong = link.SoLuong,
                                                                                                    TongSo = link.SoLuong * link.GiaTien
                                                                                                    }) %>' >
                                                            <ItemTemplate>
                                                
                                                                        <tr id="cart_row_714_1214">
                                                                            <td class="cart_content_delete"><%# Eval("STT") %></td>
                                                                            <td class="cart_content_product"><%# Eval("SanPhamTen") %></td>
                                                                            <td class="cart_content_price"><%# Eval("GiaTien") %></td>
                                                                            <td class="cart_content_quanlity"><%# Eval("SoLuong") %></td>
                                                                            <td class="cart_content_total"><span id="product_714_1214"><%# Eval("TongSo") %></span></td>
                                                                        </tr>
                                                        
                                                            </ItemTemplate>
                                                        </asp:Repeater>
                                                        <tr>
                                                            <td colspan="2" class="cart_content_status">Trạng thái: <%# Eval("TrangThaiTen") %> </td>
                                                            <td colspan="2" class="cart_content_finish_title">Tổng tiền thanh toán</td>
                                                            <td class="cart_content_finish_number"><%# Eval("TongTien") %></td>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="2" class="cart_content_code"></td>
                                                            <td colspan="2" class="cart_content_date">Ngày Mua: <%# Convert.ToDateTime(Eval("ThoiGian")).ToString("dd/MM/yyyy") %></td>
                                                            <td class="cart_content_cancle"><a class="delete" id="order_10861" href="#" onclick="XoaHoaDon('<%# Eval("Id") %>')" title=""></a></td>
                                                        </tr>
                                                     </tbody>
                                                </table>
                                        <p class="clear_line"></p>
                                    </ItemTemplate>
                                </asp:Repeater>

                                <!-- cart-detail-end -->

                            </div>

                            <div class="buy_cart_bottom">
                            </div>
                        </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
